/// id : 1940054302298071042
/// createTime : "2025-07-01T22:26:05"
/// updateTime : "2025-07-01T22:48:47"
/// title : "凤凰架构：构建可靠的大型分布式系统"
/// coverAddr : "http://192.168.31.61:9000/product-cover/fenix.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=admin%2F20250725%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250725T061607Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=512af11f72d599290bec3d347befe0ea77ead397fba6fc039693d2dc9eeb49c9"
/// price : 49.00
/// description : "<p>这是一部以“如何构建一套可靠的分布式大型软件系统”为叙事主线的开源文档，是一幅帮助开发人员整理现代软件架构各条分支中繁多知识点的技能地图。文章《<a href='https://icyfenix.cn/introduction/about-the-fenix-project.html' target=_blank>什么是“凤凰架构”</a>》详细阐述了这部文档的主旨、目标与名字的来由，文章《<a href='https://icyfenix.cn/exploration/guide/quick-start.html' target=_blank>如何开始</a>》简述了文档每章讨论的主要话题与内容详略分布</p>"
/// rate : 9.2
/// detailAddr : "http://192.168.31.61:9000/product-detail/fenix.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=admin%2F20250725%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250725T061607Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=f51a461ebf8790d7eb97daf8b53346db1e1835f56dc28aa6a0840856a99f46ae"
/// stockpile : 95
/// specificationList : [{"id":1940054302423900162,"item":"作者","value":"周志明"},{"id":1940054302423900164,"item":"出版社","value":"机械工业出版社"},{"id":1940060015036534786,"item":"拉拉","value":"你好"}]

class Product {
  Product({
    num? id,
    String? createTime,
    String? updateTime,
    String? title,
    String? coverAddr,
    num? price,
    String? description,
    num? rate,
    String? detailAddr,
    num? stockpile,
    List<SpecificationList>? specificationList,}){
    _id = id;
    _createTime = createTime;
    _updateTime = updateTime;
    _title = title;
    _coverAddr = coverAddr;
    _price = price;
    _description = description;
    _rate = rate;
    _detailAddr = detailAddr;
    _stockpile = stockpile;
    _specificationList = specificationList;
  }

  Product.fromJson(dynamic json) {
    _id = json['id'];
    _createTime = json['createTime'];
    _updateTime = json['updateTime'];
    _title = json['title'];
    _coverAddr = json['coverAddr'];
    _price = json['price'];
    _description = json['description'];
    _rate = json['rate'];
    _detailAddr = json['detailAddr'];
    _stockpile = json['stockpile'];
    if (json['specificationList'] != null) {
      _specificationList = [];
      json['specificationList'].forEach((v) {
        _specificationList?.add(SpecificationList.fromJson(v));
      });
    }
  }
  num? _id;
  String? _createTime;
  String? _updateTime;
  String? _title;
  String? _coverAddr;
  num? _price;
  String? _description;
  num? _rate;
  String? _detailAddr;
  num? _stockpile;
  List<SpecificationList>? _specificationList;

  num? get id => _id;
  String? get createTime => _createTime;
  String? get updateTime => _updateTime;
  String? get title => _title;
  String? get coverAddr => _coverAddr;
  num? get price => _price;
  String? get description => _description;
  num? get rate => _rate;
  String? get detailAddr => _detailAddr;
  num? get stockpile => _stockpile;
  List<SpecificationList>? get specificationList => _specificationList;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['createTime'] = _createTime;
    map['updateTime'] = _updateTime;
    map['title'] = _title;
    map['coverAddr'] = _coverAddr;
    map['price'] = _price;
    map['description'] = _description;
    map['rate'] = _rate;
    map['detailAddr'] = _detailAddr;
    map['stockpile'] = _stockpile;
    if (_specificationList != null) {
      map['specificationList'] = _specificationList?.map((v) => v.toJson()).toList();
    }
    return map;
  }

}

/// id : 1940054302423900162
/// item : "作者"
/// value : "周志明"

class SpecificationList {
  SpecificationList({
    num? id,
    String? item,
    String? value,}){
    _id = id;
    _item = item;
    _value = value;
  }

  SpecificationList.fromJson(dynamic json) {
    _id = json['id'];
    _item = json['item'];
    _value = json['value'];
  }
  num? _id;
  String? _item;
  String? _value;

  num? get id => _id;
  String? get item => _item;
  String? get value => _value;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['item'] = _item;
    map['value'] = _value;
    return map;
  }

}